package com.liaoct.lct.fragment;

import java.util.Map;

import com.hp.hpl.sparta.Text;
import com.liaoct.lct.activity.R;
import com.liaoct.lct.db.DataBaseManagement;
import com.liaoct.lct.util.Util;

import android.annotation.SuppressLint;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * 联系人详细信息展示Fragment
 * 
 * @author liaoct
 * 
 */
public class ContactInfoFragment extends Fragment {

	private View view;

	private Map<String, Object> map;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		this.view = inflater.inflate(R.layout.fragment_contactinfo, container,
				false);
		TextView contactName = (TextView) this.view
				.findViewById(R.id.contactinfo_name);
		contactName.setText(Util.objectToString(map.get("name")));
		TextView contactCompany = (TextView) this.view
				.findViewById(R.id.contactinfo_company);
		contactCompany.setText(Util.objectToString(map.get("company")));
		ImageView imageView = (ImageView) this.view
				.findViewById(R.id.contactinfo_head);
		return view;
	}

	public void bindData(Map<String, Object> map) {
		this.map = map;
	}
}
